import Vue from 'vue'
import Router from 'vue-router'
import NProgress from 'nprogress'
import ElementUI from 'element-ui'
import login from '../components/sindex'
import Home from '../pages/Home'
import projectList from '../pages/projectCase/projectList'

import productList from '../pages/product/productList'
import humanList from '../pages/human/humanList'
import messageManage from '../pages/contact/messageManage'
import newsList from '../pages/news/newsMangerList'
import parnterList from '../pages/parnter/parnterList'



Vue.use(ElementUI)
Vue.use(Router)


const router=new Router({
  routes: [
    {
      path: '/Login',
      name: 'login',
      component: login,
      hidden: true
    },
    //{ path: '/main', component: Main },
    {
      path: '/',
      component: Home,
      name: '主页',
      children: [
        { path: '/projectList', component: projectList, name: '工程案例' },
        { path: '/productList', component: productList, name: '产品中心' },
        { path: '/humanList', component: humanList, name: '人事架构' },
        { path: '/newsList', component: newsList, name: '新闻动态' },
        { path: '/parnterList', component: parnterList, name: '合作伙伴' }

      ]
    },
    {
      path: '/',
      component: Home,
      name: '关于我们',
      children: [

        { path: '/humanList', component: humanList, name: '高管团队' }

      ]
    },
      {
          path: '/',
          component: Home,
          name: '联系我们',
          children: [

              { path: '/messageManage', component: messageManage, name: '在线留言' }


          ]
      }


  ]
});

// router.beforeEach((to, from, next) => {
//   NProgress.start();
// next()
// })
//
// router.afterEach(transition => {
//   NProgress.done();
// });
export default router;
